﻿using System.Collections.Generic;
using System.Reflection;
using AdAggregator.Advertisement;
using AdAggregator.SearchData;
using AdAggregator.Website;

namespace AdAggregator.Aggregator
{
    public interface IAggregator<in TSearchData, TAdvertisement> where TAdvertisement : IAdvertisement
                                                              where TSearchData : ISearchData
    {
        IEnumerable<TAdvertisement> Results { get; set; }
        long AllAvailable { get; set; }
        long PageCount { get; set; }
        int ResultsPerPage { get; set; }
        bool IsInversedSearch { get; set; }

        IEnumerable<PropertyInfo> GetSortableProperties();
        IEnumerable<IWebsite<TSearchData, TAdvertisement>> GetWebsites();
        void Aggregate(TSearchData searchData, bool isInitialSearch);
    }
}
